﻿using CardPlay.Model.CardModel;
using CardPlay.Model.GameModel;
using CardPlay.Model.GameModel.Actions;

namespace CardPlay.DemoPack.Games.FortyThievesVariants
{
    [Game("BBE138E8-3DA7-4E58-B961-890B6190169D", LevelOfDifficulty.Medium, LevelOfSkill.ModerateSkill, DurationOfPlay.MoreThan10Minutes, NumberOfDecks = 2, Family = FamilyName)]
    public class Quadrangle : TripleLine
    {
        public Quadrangle()
        {
            TableauBuildSequence = CardFaceSequence.SameSuitDescendingRank;
            FoundationBuildSequence = CardFaceSequence.SameSuitAscendingRank;

            MaximumDeals = 1;
            DealFoundationsInSetup = false;
        }

        protected override void PrepareDealScript(DealScript script)
        {
            script.Deal("up").To(Foundation1);
        }

        protected override bool AllowedToPickupAtTableau(RemovePileAction action)
        {
            return action.IsActingOnFaceUpTopCard();
        }
    }
}